package design.simdi.code.final_paper.site.panels.licente.admisi;

import org.apache.wicket.model.LoadableDetachableModel;

import design.simdi.code.final_paper.core.daos.StudentAdmisDao;
import design.simdi.code.final_paper.core.entities.StudentAdmis;

/**
 * 
 * @author Marius Dumitriu - (Jun 25, 2010 - 3:00:49 AM)
 * 
 */
public class DetachableAdmisModel extends LoadableDetachableModel<StudentAdmis> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private final long id;
	private final StudentAdmisDao studentAdmisDao;

	public DetachableAdmisModel(StudentAdmis object, StudentAdmisDao keywordDao) {
		super(object);
		this.id = object.getId();
		this.studentAdmisDao = keywordDao;
	}

	@Override
	protected StudentAdmis load() {
		return studentAdmisDao.get(id);
	}

}
